package com.deram.ctin.serv.search.entity.solr.api;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.business.entity.BusinessInfo;
import com.deram.ctin.serv.customs.entity.CustomsInfo;
import com.deram.ctin.serv.enter.entity.EnterInfo;
import com.deram.ctin.serv.search.entity.solr.bean.SolrCustomsInfo;
import com.deram.ctin.serv.search.entity.solr.bean.SolrEnterInfo;
import com.deram.ctin.serv.search.entity.solr.search.WebEnterSearchParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.data.solr.core.query.result.SolrResultPage;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

@FeignClient("serv-search")
@RequestMapping("/solrEnterInfoApi")
public interface SolrEnterInfoApi {

    @PostMapping("/find")
    SolrEnterInfo find(@RequestParam("id") Long id);

    @PostMapping("/findAll")
    List<SolrEnterInfo> findAll();

    @PostMapping("/searchByKeywords")
    PageResult<SolrEnterInfo> searchByKeywords(@RequestBody WebEnterSearchParam keywords, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);

    @PostMapping("/save")
    SolrEnterInfo save();

    @PostMapping("/saveList")
     void saveList(@RequestBody List<EnterInfo> infoList);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id);
}